
  
    let data = [
        
    ];
    function qq(a) {

        
        let xingming = []
        let pingfen = []  
        let gongzi = []
            
     

        data.forEach(function (item,index) {
            xingming.push(item.username)
            pingfen.push(item.score)
            gongzi.push(item.salary)
          })
        //   图1
    let myecharts= echarts.init(document.querySelector('.topp'))

    
        option = {
            title: {
                text: '评分',
                left: '10%',
               
            },
        grid: {
        
        top:50,
        containLabel: true
        },
    xAxis: [{
        type: "category",
        boundaryGap:['3%','3%'],
        axisLabel: {
         fontSize:14,
            margin:20,
            textStyle: {
                color: "#7ec7ff"
            }
        },
        axisLine: {
        
            lineStyle: {
                color: "blue"
            }
        },
        splitLine: {
            show:false,
        },
        axisTick:{
            show:true,
        },
        data:xingming 
    }],
    yAxis: [
        {
            type: "value",
            axisLabel: {
                textStyle: {
                    color: "#7ec7ff"
                }
            },
          
            splitLine: {
                show:false,
            },
            axisLine: {
                show: true,
                lineStyle:{
                    color:"skyblue"
                }
            },
            axisTick: {
                show:true ,
            }
        }
    ],
    series: [{
        type: "line",
        lineStyle: {
            normal: {
                width:2,
                color: "#19a3df",
            }
        },
     
        data: pingfen
    }]
    };
   

        myecharts.setOption(option) 

};

    function qqq() {
    
        
    let xingming = []
    let pingfen = []  
    let gongzi = []
        
 

    data.forEach(function (item,index) {
        xingming.push(item.username)
        pingfen.push(item.score)
        gongzi.push(item.salary)
      })




    // 图2
    let myechart = echarts.init(document.querySelector('.bottomm'))
        
        option = {
            title: {
                text: '薪资',
                left: '10%',
            },
        grid: {
        
        top:50,
        containLabel: true
        },
        xAxis: {
            type: 'category',
            data: xingming,
            boundaryGap: ['5%','5%'],
            axisLabel: {
             fontSize:14,
                margin:20,
                textStyle: {
                    color: "#7ec7ff"
                }
            },
            axisLine: {
            
                lineStyle: {
                    color: "blue"
                }
            },
            splitLine: {
                show:false,
            },
            axisTick:{
                show:true,
            },
        },
        yAxis: {
            type: 'value',
            axisLabel: {
                textStyle: {
                    color: "#7ec7ff"
                }
            },
          
            splitLine: {
                show:false,
            },
            axisLine: {
                show: true,
                lineStyle:{
                    color:"skyblue"
                }
            },
            axisTick: {
                show:true ,
            }
        },
            series: [{
            barWidth:10,
            data: gongzi,
            type: 'bar',
            lineStyle: {
                normal: {
                    width:2,
                    color: "#19a3df",
                }
            },
        }]
    };

    myechart.setOption(option)
}
   


$('a').on('click', function () {
    let value1 =document.querySelector('.q').value
    let value2 = document.querySelector('.w').value
    let value3 = document.querySelector('.e').value
    
   
   
    let table = document.querySelector('table')
    $(table).append(`<tr><td>${value1}</td><td>${value2}</td><td>${value3}</td></tr>`)
    

        qq(data.push({ username: value1, score:value2 , salary: value3 },)),
        qqq()
    
    $('input').val('')
})
